%在N=13的基础上创建构型
%r_max和r_min确定空间边界
function config = create_config_multiple(config_13, r_max, r_min)
    N = length(config_13);
    d = 0.88;
    config = config_13;
    
    for i = 14:N
        while 1
            r = r_min + rand * (r_max - r_min);
            theta = pi * rand;
            phi = 2*pi * rand;
            x = r * sin(theta) * cos(phi);
            y = r * sin(theta) * sin(phi);
            z = r * cos(theta);

            new = [x,y,z];
            
            judge = 1;

            for j=1:(i-1)
                rj_vector = config{j} - new;
                rj_square = sum(rj_vector.^2);
                rj = sqrt(rj_square);
                if(rj < d)
                    judge = 0;
                    break
                end
            end

            if(judge == 1)
                config{i} = new;
                break
            else

            end        
        end   
    end
    return
end